<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 谷歌-
        window.onmousewheel = function(e){
            console.log(e)
            if(e.wheelDelta > 0){
                console.log('滑轮向上')
            }else{
                console.log('滑轮向下')
            }
        }
        // 火狐
        window.addEventListener('DOMMouseScroll',function(e){
            if(e.detail > 0){
                console.log('滑轮向下')
            }else{
                console.log('滑轮向上')
            }
        })
    </script>
</body>
</html>